package com.lw.sbdemo2.common.base;

import com.lw.sbdemo2.common.web.formatter.LongToDateFormatter;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;

/**
 * 控制层基类
 *
 * @author LinWang
 * @createTime 2016-12-27
 */
public class BaseController {

    /**
     * 添加自定义绑定
     * @param binder 绑定
     */
    @InitBinder
    public void initBinder(WebDataBinder binder) {
        binder.addCustomFormatter(new LongToDateFormatter());
    }
}
